﻿<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>北京车辆段</title>
		<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />

		<script type="text/javascript" src="${ctx}/scripts/jquery-1.4.2.min.js"></script>
		<script type="text/javascript" src="${ctx}/scripts/jquery.easyui.min.js"></script>
		<script type="text/javascript" src="${ctx}/scripts/jquery.pagination.js"></script>
		<script type="text/javascript" src="${ctx}/scripts/locale/easyui-lang-zh_CN.js"></script>
		<link href="${ctx}/css/index.css" rel="stylesheet" type="text/css" />
		<link href="${ctx}/scripts/pagination.css" rel="stylesheet"	type="text/css" />
     	<script type="text/javascript">
     	   function viewNews(id){
             window.location="${ctx}/web/Web/showNews.do?newsid="+id;     	
     	   }
     	
     	  $(document).ready(function() {  
	         $.get("${ctx}/web/Web/listAjaxNews.do", {
                 Action:"get",catId:"<%=request.getParameter("categoryid")%>"}, function (data, textStatus){	
   
                 var jsonData =   [{total:'19',rows:[{id:'123',createTimeString:'2012-02-02',title:'xxx1'},
            {id:'123',createTimeString:'2012-02-02',title:'xxx1'},
                 {id:'123',createTimeString:'2012-02-02',title:'xxx2'},
                 {id:'123',createTimeString:'2012-02-02',title:'xxx3'},
                 {id:'123',createTimeString:'2012-02-02',title:'xxx4'},
                {id:'123',createTimeString:'2012-02-02',title:'xxx5'},
              {id:'123',createTimeString:'2012-02-02',title:'xxx6'},
               {id:'123',createTimeString:'2012-02-02',title:'xxx7'},
                {id:'123',createTimeString:'2012-02-02',title:'xxx8'},
                {id:'123',createTimeString:'2012-02-02',title:'xxx9'},
                 {id:'123',createTimeString:'2012-02-02',title:'xxx10'},
                 {id:'123',createTimeString:'2012-02-02',title:'xxx11'},
                {id:'123',createTimeString:'2012-02-02',title:'xxx12'},
                {id:'123',createTimeString:'2012-02-02',title:'xxx13'},
              {id:'123',createTimeString:'2012-02-02',title:'xxx14'},
                 {id:'123',createTimeString:'2012-02-02',title:'xxx15'},
                {id:'123',createTimeString:'2012-02-02',title:'xxx16'},
                 {id:'123',createTimeString:'2012-02-02',title:'xxx17'},
                {id:'1234',createTimeString:'2012-01-01',title:'xxx18'}]}]; 
                  jsonData = eval("["+data+"]");                 
                  var totalsize = jsonData[0].total;
                  var lidata = jsonData[0].rows;
       			  for(var k = 0 ; k < totalsize; k++){           	          		
          			 $('#hiddenresult').append('<li class="show"><span style="position:absolute;right:200px;">'+lidata[k].createTimeString+'</span><a href="javascript:viewNews(\''+lidata[k].id+'\');">'+lidata[k].title+'</a></li>');
        		 }            
 				

		
		$(function(){
		//总数目
		var length = $("#hiddenresult .show").length;

		//从表单获取分页元素参数
		var optInit = getOptionsFromForm();
		$("#Pagination").pagination(length, optInit);
	
	
	//-----------------------------------
	function getOptionsFromForm(){
		var opt = {callback: pageselectCallback, 
		prev_text:'前一页',
 		next_text:'后一页'};
		// 从文本域中收集参数 - 这些空间名与参数名相对应
		$("input:text").each(function(){
			opt[this.name] = this.className.match(/numeric/) ? parseInt(this.value) : this.value;
		});
		//避免demo重引入HTML
		var htmlspecialchars ={ "&":"&amp;", "<":"&lt;", ">":"&gt;", '"':"&quot;"}
		$.each(htmlspecialchars, function(k,v){
			opt.prev_text = opt.prev_text.replace(k,v);
			opt.next_text = opt.next_text.replace(k,v);
		})
		return opt;
		}
	//-------------------------------
	function pageselectCallback(page_index, jq){
		// 从表单获取每页的显示的列表项数目
		var items_per_page = 10;
		var max_elem = Math.min((page_index+1) * items_per_page, length);
		
		$("#list_news").html("");
		// 获取加载元素
		for(var i=page_index*items_per_page;i<max_elem;i++){
			$("#list_news").append($("#hiddenresult .show:eq("+i+")").clone());
		}
		//阻止单击事件
		return false;
	}
	});

		});		
		
				});		
	    </script>
	</head>

	<body>
		<div class="box">
			<div class="top">
				<div class="Tright">
					<a href="#">收藏本页</a><span>|</span><a href="#">设为首页</a>
				</div>
				您好，欢迎光临北京车辆段！
			</div>
			 <div class="top_img">   	
				<div class="column">
     			    <div class="photo" id="photo">
     			     	<ul class="clear" id="photo-sub" style="width:2944px;height:200px">
      				      <li><a href="#" title="图片说明一" target="_blank"><img src="${ctx}/images/web/qj3.jpg" /></a></li>
      				      <li><a href="#" title="图片说明一" target="_blank"><img src="${ctx}/images/web/qj1.jpg" /></a></li>
      					  <li><a href="#" title="图片说明一" target="_blank"><img src="${ctx}/images/web/qj.jpg" /></a></li>
           				  <li><a href="#" title="图片说明一" target="_blank"><img src="${ctx}/images/web/qj1.jpg" /></a></li>
          				</ul>
         			</div>
        		</div>	
    		</div> 

			<div class="logo_box">
				<div class="logo">
					<a href="#"><img src="${ctx}/images/web/logo.jpg" />
					</a>
				</div>
				<div id="logo_middle" class="logo_middle">
					<dl>
						<dd>
							<a href="#">访谈</a><a href="#">博客</a>
						</dd>
						<dd>
							<a href="#">评论</a><a href="#">论坛</a>
						</dd>
					</dl>

					<div class="clear"></div>
				</div>
				<div class="logo_tq">

					<div id="weather">
						北京
						<br />
						晴转多云
						<br />
						-7~1微风
					</div>
					<div class="clear"></div>
				</div>
				<div class="clear"></div>
			</div>
			<div class="nav_box">
				<ul id="nav">
					<li>
						<a href="">首页</a>
						<ul>
							<li>
								<a href="">首页</a>
							</li>
						</ul>
					</li>
					<li>
						<a href="">办公中心</a>
						<ul>
							<li>
								<a href="">办公中心</a>
							</li>
						</ul>
					</li>
					<li>
						<a href="">网络询呼</a>
						<ul>
							<li>
								<a href="">网络询呼</a>
							</li>
						</ul>
					</li>
					<li>
						<a href="">电子邮件</a>
						<ul>
							<li>
								<a href="">电子邮件</a>
							</li>
							<li>
								<a href="https://10.64.3.121/exchange">上级邮件</a>
							</li>
							<li>
								<a href="http://10.78.103.132/email">段内邮件</a>
							</li>
						</ul>
					</li>
					<li>
						<a href="">文件传递</a>
						<ul>
							<li>
								<a href="">文件传递</a>
							</li>
							<li>
								<a href="http://10.78.103.30">内部FTP</a>
							</li>
							<li>
								<a href="http://10.78.103.30:85">外部FTP</a>
							</li>
						</ul>
					</li>
					<li>
						<a href="">软件下载</a>
						<ul>
							<li>
								<a href="">软件下载</a>
							</li>
						</ul>
					</li>
					<li>
						<a href="">干部考核通报</a>
						<ul>
							<li>
								<a href="">干部考核通报</a>
						</ul>
					</li>
					<li>
						<a href="">管理登陆</a>
						<ul>
							<li>
								<a href="">管理登陆</a>
						</ul>
					</li>
				</ul>
			</div>
			<div class="login_box">

				<div class="login">
					<form id="forms" action="${ctx}/web/Web/webLogin.do" method="post">
						<c:if
							test="${sessionScope.username==null||sessionScope.username==''}">
            用户名：<input name="userName" type="text" class="shurubox" />
            密码：<input name="userPwd" type="password" class="shurubox" />
							<input type="button" onclick="login()" value="立即登录" class="liji" />
						</c:if>
						<c:if
							test="${sessionScope.username!=null&&sessionScope.username!=''}">
                您好！${sessionScope.username}    <a
								href="${ctx}/web/Web/webLogout.do">退出 </a>
						</c:if>
						<c:if test="${requestScope.result!=null&&requestScope.result!=''}">
							<script type="text/javascript">
			     alert('${requestScope.result}'); 
			 </script>
						</c:if>
					</form>

				</div>
				<div class="login_search">
					<input type="text" value="请输入搜索关键字" class="search_box" />
					<input type="submit" class="search_but" value="" />
				</div>
				<div class="clear"></div>
			</div>
			<div class="content">
				<div class="left">
					<div class="left_nrbox">
						<div class="left_nrbox_title">
							安全天数
						</div>
						<div class="left_nrbox_center">
							<div class="mbottom">
								<span>
									<div id="safe1">
										安全生产
									</div> </span>
								<table id="safe1Table" width="93" border="0"
									style="background: url(${ctx}/images/web/time_bg.jpg) no-repeat; height: 37px; text-align: center; float: left; vertical-align: middle;; font-size: 18px; font-weight: bold; font-family: 黑体">

								</table>
								<span>天</span>
								<div class="clear"></div>
							</div>
							<div class="mbottom">
								<span>
									<div id="safe2">
										安全生产
									</div> </span>
								<table id="safe2Table" width="93" border="0"
									style="background: url(${ctx}/images/web/time_bg.jpg) no-repeat; height: 37px; text-align: center; float: left; vertical-align: middle; font-size: 18px; font-weight: bold; font-family: 黑体">

								</table>
								<span>天</span>
								<div class="clear"></div>
							</div>
							<div class="mbottom">
								<span>
									<div id="safe3">
										安全生产
									</div> </span>
								<table id="safe3Table" width="93" border="0"
									style="background: url(${ctx}/images/web/time_bg.jpg) no-repeat; height: 37px; text-align: center; float: left; vertical-align: middle;; font-size: 18px; font-weight: bold; font-family: 黑体">

								</table>
								<span>天</span>
								<div class="clear"></div>
							</div>
							<div class="clear"></div>
						</div>
					</div>
					<div class="left_nrbox" style="height: 310px;">

						<div class="left_nrbox_title">
							未签收通报
						</div>
						<div class="left_nrbox_center" id="newsList">

						</div>
					</div>
					<div id="left_biaoti" class="left_biaoti">

					</div>
					<div class="left_grb">
						<a href="${ctx}/web/Web/getNewsByTitle.do?title=grb"><img
								src="${ctx}/images/web/grb.jpg" />
						</a>
					</div>
					<div class="left_grb">
						<a href="${ctx}/web/Web/getNewsByTitle.do?title=lgt"><img
								src="${ctx}/images/web/jb.jpg" />
						</a>
					</div>
					<div class="left_nrbox" style="border: 1px solid #d5d5d5;">
						<div class="left_nrbox_title">
							安全宣传
						</div>
						<div class="safety_img">
							<div class="lxfscroll" id="lxfscroll">
								<ul>
									<li>
										<a href="${ctx}/web/Web/getNewsByTitle.do?title=safe"><img
												src="${ctx}/images/web/pic_2.jpg" width="200" height="200" />
										</a>
									</li>
									<li>
										<a href="${ctx}/web/Web/getNewsByTitle.do?title=safe"><img
												src="${ctx}/images/web/pic_1.jpg" width="200" height="200" />
										</a>
									</li>
									<li>
										<a href="${ctx}/web/Web/getNewsByTitle.do?title=safe"><img
												src="${ctx}/images/web/pic_2.jpg" width="200" height="200" />
										</a>
									</li>
								</ul>

							</div>
						</div>
					</div>
					<div class="left_nrbox" style="border: 1px solid #d5d5d5;">
						<div class="left_nrbox_title">
							节能环保
						</div>
						<div class="safety_img">
							<div class="wrapper">
								<div id="focus">
									<ul>
										<li>
											<div style="left: 0; top: 0; width: 200px; height: 200px;">
												<a href="${ctx}/web/Web/getNewsByTitle.do?title=hb"><img
														src="${ctx}/images/web/pic_1.jpg" width="200" height="200" />
												</a>
											</div>
										</li>
										<li>
											<div style="left: 0; top: 0; width: 200px; height: 200px;">
												<a href="${ctx}/web/Web/getNewsByTitle.do?title=hb"><img
														src="${ctx}/images/web/pic_1.jpg" width="200" height="200" />
												</a>
											</div>
										</li>
									</ul>
								</div>
							</div>
						</div>
					</div>
					<div class="left_nrbox">
						<div class="left_nrbox_title">
							友情链接
						</div>

						<div class="safety_img link" style="heigth: 70px">

							<select>
								<option>
									请选择
								</option>
							</select>
							<select>
								<option>
									请选择
								</option>
							</select>
							<select>
								<option>
									请选择
								</option>
							</select>
							<input type="submit" value="" />
						</div>
					</div>
				</div>
				<div class="right">
					<div class="right_yunshubox">
						<div class="right_yunshuboxL">
							<div class="ys_title">
								情况通报
							</div>

							<div id="list_news"><BR></div>
							<div id="Pagination" class="pagination"><!-- 这里显示分页 --></div>
						</div>


						<div id="hiddenresult" style="display:none;">

						</div>

					</div>



				</div>
				<div class="clear"></div>
			</div>

			<div class="footer">
				Copyright ©20011-2012 北京车辆段 版权所有
			</div>
		</div>
	</body>
</html>
